import { Modal } from 'ant-design-vue'
// modal弹窗
interface paramsType {
  title?: string
  content: string
  okText?: string
  cancelText?: string
}

export default {
  error: (params: paramsType):void => {
    Modal.error({
      title: params.title,
      content: params.content,
      okText: params.okText
    })
  },
  info: (params: paramsType):void => {
    Modal.info({
      title: params.title,
      content: params.content,
      okText: params.okText
    })
  },
  success: (params: paramsType):void => {
    Modal.success({
      title: params.title,
      content: params.content,
      okText: params.okText
    })
  },
  warning: (params: paramsType):void => {
    Modal.warning({
      title: params.title,
      content: params.content,
      okText: params.okText
    })
  }
}
